import { http } from "../utils/http";
// import mockHttp from "../utils/http/service";

// 地图数据
export const mapJson = (data?: object): any => {
  return http.request("get", "/getMapInfo", data);
};

// echarts数据
export const echartsJson = (data?: object): any => {
  return http.request("get", "/getEchartsInfo", data);
};

// 钱包管理
// 联盟成员钱包列表(超管)
export const getListOfUnionMember = (params: object): any => {
  return http.request("get", "/getListOfUnionMember", params);
};

// 联盟成员下拉列表(超管)
export const dropDownListOfUM = (params: object): any => {
  return http.request("get", "/dropDownListOfUM", params);
};

// 启/禁用联盟成员钱包(超管)
export const changeStatusOfUnMember = (data: object): any => {
  return http.request("post", "/changeStatusOfUnMember", data);
};

// -----------------------------------------------------

// 获取用户菜单树
export const getAsyncRoutes = (data): any => {
  return http.request("get", "/getAsyncRoutes", data);
};

// 获取菜单列表
export const getMenuList = (data): any => {
  return http.request("get", "/getMenuList", data);
};

// 获取用户列表
export const getUserList = (data): any => {
  return http.request("get", "/userList", data);
};

// 根据路由name，获取页面操作权限
export const getBtnAuthByRouteName = (name: string): Promise<string[]> => {
  return http.request("get", "/getBtnAuthByRouteName?name=" + name);
};
